package com.wjc.server.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.util.Date;

public class MemberDto {

    /**
     * id
     */
        private Long id;
    /**
     * 用户名
     */
        
        @NotBlank(message = "用户名不能为空")
        @Length(min=0,max = 30,message = "用户名字符长度过长")
        private String loginName;
    /**
     * 手机号
     */
        
        
        @Length(min=0,max = 11,message = "手机号字符长度过长")
        private String mobile;
    /**
     * 密码
     */
        
        @NotBlank(message = "密码不能为空")
        @Length(min=0,max = 32,message = "密码字符长度过长")
        private String password;
    /**
     * 昵称
     */
        
        
        @Length(min=0,max = 50,message = "昵称字符长度过长")
        private String name;
    /**
     * 头像url
     */
        
        
        @Length(min=0,max = 255,message = "头像url字符长度过长")
        private String photo;
    /**
     * 注册时间
     */
        @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        
        
        private Date registerTime;

        private String imageCode;

        private String imageCodeToken;

        private String smsCode;

    public String getSmsCode() {
        return smsCode;
    }

    public void setSmsCode(String smsCode) {
        this.smsCode = smsCode;
    }

    public String getImageCode() {
        return imageCode;
    }

    public void setImageCode(String imageCode) {
        this.imageCode = imageCode;
    }

    public String getImageCodeToken() {
        return imageCodeToken;
    }

    public void setImageCodeToken(String imageCodeToken) {
        this.imageCodeToken = imageCodeToken;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }


    @Override
    public String toString() {
        return "MemberDto{" +
                "id=" + id +
                ", loginName='" + loginName + '\'' +
                ", mobile='" + mobile + '\'' +
                ", password='" + password + '\'' +
                ", name='" + name + '\'' +
                ", photo='" + photo + '\'' +
                ", registerTime=" + registerTime +
                ", imageCode='" + imageCode + '\'' +
                ", imageCodeToken='" + imageCodeToken + '\'' +
                '}';
    }

}